﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NHINDirect
{
    public class Body : EntityPart
    {
        public Body(StringSegment body)
            : base(EntityPartType.Body, body)
        {
        }
        
        public Body(string body)
            : base(EntityPartType.Body)
        {
            this.Text = body;
        }        
        
        public Body(byte[] body)
            : base(EntityPartType.Body)
        {
            this.Text = Convert.ToBase64String(body, Base64FormattingOptions.InsertLineBreaks);
        }
        
        internal Body(Body body)
            : base(EntityPartType.Body, body.SourceText)
        {
        }
    }
}
